<?php

namespace module\manage\validate\auth;

use app\Validate;

/*
 * 权限模型.
 *
 * @property integer $id
 */
class Perm extends Validate
{
    protected $scene = [
        'save' => ['code','name','pid']
    ];
    /*
     * @inheritdoc
     */
    public $rule = [
		'id' => 'require|integer|max:10',
        'code' => 'requireWithout:id|max:40',
		'name' => 'requireWithout:id|max:40',
        'pid' => 'requireWithout:id|max:40',
    ];
    /*
     * @inheritdoc
     */
    public $field = [
		'id' => 'ID',
        'code' => '编码',
		'name' => '名称',
        'pid' => '父级',
    ];
}
